package com.andong.controller;


import com.andong.annotations.AccessControl;
import com.andong.domain.pojo.Result;
import com.andong.service.AuthService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

import static com.andong.utils.SystemConstant.SUPER_ADMIN;


/**
 * 权限表(Auth)表控制层
 *
 * @author makejava
 * @since 2024-02-29 17:25:04
 */
@RestController
@RequestMapping("/auth")
public class AuthController {
    /**
     * 服务对象
     */
    @Resource
    private AuthService authService;

    @GetMapping("/list")
    @AccessControl(roles = SUPER_ADMIN)
    public Result list() {
        return authService.getList();
    }
}

